from selenium.webdriver.common.by import By

byid = By.ID
byname = By.NAME
bycname = By.CLASS_NAME
bytname = By.TAG_NAME
bylink = By.LINK_TEXT
bycss = By.CSS_SELECTOR
byxpath = By.XPATH
byparriallike = By.PARTIAL_LINK_TEXT

url = "http://10.59.9.8:7007/boss/"

# 登录界面元素配置信息
class LoginPageElements:
    """登录页面元素定位配置（优化后）"""
    # 账号
    login_username = byxpath, '//*[@id="form1"]/div[2]/ul[1]/li[2]/input'
    # 页面信息（会员登录）
    #密码
    login_pwd = byxpath,'//*[@id="form1"]/div[2]/ul[2]/li[2]/input'
    # login_dy_text = bycname, 'reg-new'
    # login_username = byname, 'username'
    # login_pwd = byname, 'password'
    login_btn = byxpath, '/html/body/div[1]/div[2]/div[1]/form/div[3]/input'
    login_dy_text = byxpath,'/html/body/div[1]/div[2]/div[2]/div[1]/h2'  #断言  系统菜单


login_pe = LoginPageElements()


# 首页界面元素配置信息
class HomePageElements:
    """首页页面元素定位配置（优化后）"""
    # 个人信息
    home_person_text = byxpath, '/html/body/div[5]/div[2]/div[1]/div[2]/div[2]/ul/li[1]'
    # 搜索输入框
    home_search_input = bycname, 'search-input'
    # 搜索按钮
    home_search_input_btn = bycname, 'search-input-btn'
    # 退出
    home_exit_btn = bycss, 'body > div.top-wrap > div > div.top-right > ul > li:nth-child(2) > a'

home_pe = HomePageElements()




